#include<bits/stdc++.h>
using namespace std;


int main(){
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    cout<<"2996 863"<<endl<<"2994 285"<<endl<<"2991 292"<<endl<<"2995 2880"<<endl<<"2982 2137"<<endl<<"2999 2680"<<endl<<"2995 2540"<<endl<<"2986 1457"<<endl<<"2929 1919"<<endl<<"2997 2547"<<endl<<"99691 35478"<<endl<<"99987 68384"<<endl<<"99335 81601"<<endl<<"98570 49067"<<endl<<"100000 88807"<<endl<<"99990 35942"<<endl<<"99900 65610"<<endl<<"99981 44819"<<endl<<"99999 18514"<<endl<<"99955 92874"<<endl;
    return 0;
}
